package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.SetmealPageQueryDTO;
import com.sky.entity.Setmeal;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import com.sky.vo.SetmealVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealMapper {
    Integer getByid(Long id);

    List<Setmeal> page(SetmealPageQueryDTO setmealPageQueryDTO);

    @AutoFill(OperationType.INSERT)
    void insert(Setmeal setmeal);

    Setmeal getBySetmealId(Long id);

    @AutoFill(OperationType.UPDATE)
    void update(Setmeal setmeal);

    Integer getByids(List<Long> ids);

    void delete(List<Long> ids);

    List<Setmeal> setmealList(Long categoryId);

    @Select("select count(*) from setmeal where status = #{status}")
    Integer getCount(Integer status);
}
